package com.pi.shisan.service.constants;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 免打扰模式
 */
@AllArgsConstructor
@Getter
public enum DndModeTypeEnum {

    LED(1,"LED简化模式"),
    CLOCK_NOTIFY(2,"整点报时关闭模式")
    ;

    private int type;
    private String des;

    public static DndModeTypeEnum getByType(Integer type) {
        if (type == null || type < 1) {
            return null;
        }
        DndModeTypeEnum[] values = values();
        if (type > values.length) {
            return null;
        }
        return values[type - 1];
    }
}
